<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <link rel="icon" type="image/x-icon" href="_media/favicon.png">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  
  <!-- HTML Meta Tags -->
  <title>Faraday Docs</title>
  <meta name="description" content="Faraday is an HTTP client library abstraction layer that provides a common interface over many adapters (such as Net::HTTP) and embraces the concept of Rack middleware when processing the request/response cycle.">
  
  <!-- OpenGraph Meta Tags -->
  <meta property="og:url" content="https://lostisland.github.io/faraday/#/">
  <meta property="og:type" content="website">
  <meta property="og:title" content="Faraday Docs">
  <meta property="og:description" content="Faraday is an HTTP client library abstraction layer that provides a common interface over many adapters (such as Net::HTTP) and embraces the concept of Rack middleware when processing the request/response cycle.">
  <meta property="og:image" content="https://lostisland.github.io/faraday/_media/repo-card.png">
  
  <!-- Twitter Meta Tags -->
  <meta name="twitter:card" content="summary_large_image">
  <meta property="twitter:domain" content="lostisland.github.io">
  <meta property="twitter:url" content="https://lostisland.github.io/faraday/#/">
  <meta name="twitter:title" content="Faraday Docs">
  <meta name="twitter:description" content="Faraday is an HTTP client library abstraction layer that provides a common interface over many adapters (such as Net::HTTP) and embraces the concept of Rack middleware when processing the request/response cycle.">
  <meta name="twitter:image" content="https://lostisland.github.io/faraday/_media/repo-card.png">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  <link
    rel="stylesheet"
    href="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/style.min.css"
    title="docsify-darklight-theme"
    type="text/css"
  />
  <link
    rel="stylesheet"
    href="//cdn.jsdelivr.net/npm/prism-themes/themes/prism-material-light.min.css"
    id="prism-theme"
    type="text/css"
  />
</head>
<body>
  <div id="app"></div>
  <!-- Docsify plugins -->
  <script src="//cdn.jsdelivr.net/npm/docsify-edit-on-github"></script>

  <!-- Docsify config -->
  <script>
    window.$docsify = {
      name: 'Faraday',
      repo: 'lostisland/faraday',
      logo: '_media/home-logo.svg',
      homepage: 'index.md',
      search: true,
      loadSidebar: true,
      subMaxLevel: 4,
      auto2top: true,
      darklightTheme: {
        dark: {
          accent: '#EE4266',
          prismTheme: 'prism-material-dark'
        },
        light: {
          accent: '#EE4266',
          prismTheme: 'prism-material-light'
        }
      },
      plugins: [
        EditOnGithubPlugin.create(
          'https://github.com/lostisland/faraday/blob/main/docs/',
          null,
          'Edit this page on GitHub'
        ),
        function pageFooter(hook, _vm) {
          var footer = [
            '<hr/>',
            '<footer>',
            '<span>© 2009 - 2023, the Faraday Team. </span>',
            '<span>Website and branding design by <a href="https://elelopic.design" target="_blank" rel="noopener">Elena Lo Piccolo</a>.</span>',
            '</footer>',
          ].join('');

          hook.afterEach(function (html) {
            return html + footer;
          });
        },
        function prismThemeSwitcher(hook, _vm) {
          // Switch Prism theme based on docsify-darklight-theme setting
          let lightTheme = '//cdn.jsdelivr.net/npm/prism-themes/themes/prism-one-light.min.css';
          let darkTheme = '//cdn.jsdelivr.net/npm/prism-themes/themes/prism-one-dark.min.css';

          let switchTheme = () => {
            console.log('Theme changed');
            let theme = localStorage.getItem('DARK_LIGHT_THEME')
            let link = document.getElementById('prism-theme');
            link.setAttribute('href', theme === 'dark' ? darkTheme : lightTheme);
          }

          hook.ready(() => {
            document.getElementById('main').addEventListener('click', switchTheme);
            switchTheme();
          });
        },
      ]
    }
  </script>
  <!-- Docsify v4 -->
  <script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
  <!-- Docsify Darklight Theme -->
  <script
    src="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/index.min.js"
    type="text/javascript">
  </script>
  <!-- Prism Ruby highlight -->
  <script src="//cdn.jsdelivr.net/npm/prismjs@v1.x/components/prism-ruby.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/prismjs@v1.x/plugins/autoloader/prism-autoloader.min.js"></script>

  <!-- Other Plugins -->
  <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
</body>
</html>
